﻿using System;
using System.Runtime.CompilerServices;
using UnityEngine;

public static class MaterialExtensions
{
    public static void SetStandardAsTransparent(this Material material)
    {
        material.SetFloat("_Mode", 2f);
        material.SetInt("_SrcBlend", 5);
        material.SetInt("_DstBlend", 10);
        material.SetInt("_ZWrite", 0);
        material.DisableKeyword("_ALPHATEST_ON");
        material.EnableKeyword("_ALPHABLEND_ON");
        material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
        material.renderQueue = 0xbb8;
    }
}

